home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-01-06 | 1.8 KB | 65 lines | [TEXT/MMCC] |
- //
- // CTCPApplication.h
- //
- // TurboTCP library
- // Application subclass
- // TCL-specific class
- //
- // Copyright © 1993-95, FrostByte Design / Eric Scouten
- //
-
- #pragma once
-
- #include "CApplication.h"
- #include "TurboTCP.buildflags.h"
-
- #if !TurboTCP_TCL
- #error: This file should be used with TCL projects only!
- #endif
-
-
- //***********************************************************
-
- class CTCPApplication : public CApplication {
-
- // This application subclass should be used in place of the standard CApplication. It hooks
- // into the event loop to handle MacTCP events which were queued at interrupt time, and
- // takes care of opening and closing the MacTCP driver at the appropriate times.
- //
- // NOTE: It is highly recommended that you enable background processing by turning on
- // the “Background Null Events” SIZE resource flag. See the Set Project Type… dialog
- // under the Project menu.
- //
- // By default, TurboTCP sets the maximum sleep time to 90 ticks (1.5 seconds). Feel free
- // to modify this behavior. However, I recommend that you use a setting somewhat lower
- // than TCL’s default of 600 ticks (10 seconds). You may wish to use a lower value for
- // high-performance applications, or a higher value to be more MultiFinder-friendly.
-
-
- TCL_DECLARE_CLASS;
-
- public:
- CTCPApplication();
- CTCPApplication(short extraMasters, Size aRainyDayFund,
- Size aCriticalBalance, Size aToolboxBalance);
- void ITCPApplication(short extraMasters, Size aRainyDayFund,
- Size aCriticalBalance, Size aToolboxBalance);
-
- virtual void MakeHelpers();
-
- // application shutdown
-
- virtual Boolean Quit();
-
- // foreground/background event trapping
-
- virtual void Process1Event();
-
-
- // data members
-
- short maxTCPEvents; // maximum number of TCP events to process
- long maxTCPTicks; // maximum ticks to spend in TCP event loop
-
- };
-